package ooday03.ooday0302;
//接口的测试类
public class SwimTest {
    public static void main(String[] args) {
        Dog dog = new Dog("小黑",2,"黑");
        //复用了父类的方法
        dog.drink();
        //Dog类重写之后的
        dog.eat();
        //Dog类特有的
        dog.lookHome();
        //Dog类重写之后的
        dog.swim();

        Chick chick = new Chick("小鸡",1,"黄");
        //复用了父类的方法
        chick.drink();
        //Chick类重写之后的
        chick.eat();
        //Chick类特有的
        chick.layEgg();

        Fish fish = new Fish("小鱼",3,"蓝");
        //复用了父类的方法
        fish.drink();
        //Fish类重写之后的
        fish.eat();
        //Fish类重写之后的
        fish.swim();
    }
}
